fix(tabs): render line variant indicator via after pseudo-element#10682
Open
abdulmunimjemal wants to merge 1 commit into
Open
fix(tabs): render line variant indicator via after pseudo-element#10682abdulmunimjemal wants to merge 1 commit into
abdulmunimjemal wants to merge 1 commit into
Conversation
Contributor
|
@abdulmunimjemal is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10497.
The bug
The
linevariant ofTabsListdoes not render the active-tab indicator. Root cause: the pseudo-element used to draw the line (after:bg-foreground after:h-0.5 ...) is missingafter:content-['']. Without an explicitcontentvalue, the pseudo-element does not generate a box, so its background and dimensions never paint.The fix
Prepend
after:content-['']to the className string in both canonical source files:apps/v4/registry/bases/base/ui/tabs.tsxapps/v4/registry/bases/radix/ui/tabs.tsxThen
pnpm registry:buildregenerates the affectedapps/v4/public/r/styles/*/tabs.jsonfiles andapps/v4/styles/*/ui/tabs.tsxlegacy mirrors.Note re: PR #10544
PR #10544 attempts to fix the same issue but only edits
apps/v4/styles/base-vega/ui/tabs.tsx— that file is a generated mirror overwritten bypnpm registry:build, so even if merged the fix would be overwritten on the next build, and only one of 14 style variants would have been covered. This PR fixes both canonical sources so all generated outputs get the fix.